#include <string.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>

#include <SDL2/SDL.h>

#include "swd3e_import.h"

SDL_Surface **SS2D_main_surface = (SDL_Surface **)SS2D_ACCUMULATION_SURFACE_ADDRESS;
SDL_Texture **SS2D_main_texture = (SDL_Texture **)SS2D_ACCUMULATION_TEXTURE_ADDRESS;
SDL_Surface **SS2D_conversion_surface = (SDL_Surface **)SS2D_CONVERSION_SURFACE_ADDRESS;
SDL_Surface **SS2D_bg_surface = (SDL_Surface **)SS2D_BG_SURFACE_ADDRESS;
SDL_Texture **SS2D_bg_texture = (SDL_Texture **)SS2D_BG_TEXTURE_ADDRESS;
SDL_Rect *SS2D_render_dst_rect = (SDL_Rect *)SS2D_RENDER_DST_RECT_ADDRESS;
float *SS2D_render_scale_x = (float *)SS2D_RENDER_SCALE_X_ADDRESS;
float *SS2D_render_scale_y = (float *)SS2D_RENDER_SCALE_Y_ADDRESS;

uint8_t *Run_Fight = (uint8_t *)RUN_FIGHT_ADDRESS;
uint8_t *is_show_menu = (uint8_t *)IS_SHOW_MENU_ADDRESS;

int16_t *ExCommandCount = (int16_t *)EX_COMMAND_COUNT_ADDRESS;
int16_t *ExCommandNo = (int16_t *)EX_COMMAND_NO_ADDRESS;

uint8_t *ForceSpellMenu = (uint8_t *)FORCE_SPELL_MENU_ADDRESS;
uint8_t *ForceCommandMenu = (uint8_t *)FORCE_COMMAND_MENU_ADDRESS;
uint8_t *ForceObsoltMenu = (uint8_t *)FORCE_OBSOLT_MENU_ADDRESS;
uint8_t *ForceChAttrMenu = (uint8_t *)FORCE_CHATTR_MENU_ADDRESS;

int *MainMenu_selectitem = (int *)MAIN_MENU_SELECTITEM_ADDRESS;
int *fMenu = (int *)FMENU_ADDRESS;
int *ObsoltSel = (int *)OBSOLT_SEL_ADDRESS;

rbtree *StringDBmap = (rbtree *)STRING_DB_MAP_ADDRESS;
